package org.similarity.core;

import java.io.IOException;

import org.similarity.extension.ISimilarityDealLogic;
import org.similarity.extension.VectorSimilarity;
import org.similarity.io.SerWriter;

public class DefaultSimDealLogic<T extends VectorSimilarity> implements ISimilarityDealLogic<T> {
	private SerWriter<T> writer;
	
	public DefaultSimDealLogic(SerWriter<T> tmpWrt) {
		super();
		this.writer = tmpWrt;
	}

	@Override
	public boolean deal(T t) {
		// TODO Auto-generated method stub
		try {
			writer.Write(t);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			return false;
		}
		return true;
	}

}
